[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
VMENU() "Pull-Down" menu system
Description:
VMENU() provides the programmer with a very fast and efficient means
of producing "pull-down" menus for their users. VMENU() is screen
destructive.
Syntax:
VMENU( <expAC1>, <expAN1>, <expAN2>, <expAC2>, <expAC3>, <expN>,
<expAL> )
Pass:
<expAC1> = List of all available options on all available menus
<expAN1> = List of where each menu begins
<expAN2> = List of where each menu ends
<expAC2> = List of messages for each menu option
<expAC3> = Title array
<expN> = Number of elements in <expAC3>
<expAL> = Parallel array of logical values. If a value in this array
is .F., the parallel element in <expAC1> is disabled
Return:
<expN> = Option (element) the user selected
Notes:
Example:
PRIVATE ac_Options[50]
PRIVATE an_Start[10]
PRIVATE an_End[10]
PRIVATE ac_Msgs[10]
PRIVATE ac_Title[4]
PRIVATE n_Elements
PRIVATE al_Avail[50]
* Set up the title
n_Elements = 4
ac_Title[1] = ""
ac_Title[2] = "Sample menu system"
ac_Title[3] = DTOC(DATE())
ac_Title[4] = ""
* Menu across top
an_Start[1] = 1
an_End[1] = 4
ac_Options[1] = "Maintenance"
ac_Options[2] = "Reports"
ac_Options[3] = "Utilities"
ac_Options[4] = "Other"
* First pull-down
an_Start[2] = 10
an_End[2] = 12
ac_Options[10] = "Clients "
ac_Options[11] = "Products "
ac_Options[12] = "SalesPersons"
* Second pull-down
an_Start[3] = 15
an_End[3] = 18
ac_Options[15] = "Client list "
ac_Options[16] = "Product list "
ac_Options[17] = "Territory Report"
ac_Options[18] = "Performance Log "
* Third pull-down
an_Start[4] = 20
an_End[4] = 21
ac_Options[20] = "Pack databases"
ac_Options[21] = "Re-Index "
* Fourth pull-down
an_Start[5] = 25
an_End[5] = 27
ac_Options[25] = "Set colors "
ac_Options[26] = "Product information"
ac_Options[27] = "Quit "
* Enable each option
FOR n_Cntr = 1 TO 50
al_Avail[n_Cntr] = .T.
NEXT n_Cntr
* Set all the messages to nothing
FOR n_Cntr = 1 TO 10
ac_Msgs[n_Cntr] = ""
NEXT n_Cntr
DO WHILE .T.
n_Choice = VMENU(ac_Options, an_Start, an_End, ac_Msgs, ac_Title,
n_Elements, al_Avail)
DO CASE
CASE n_Choice = 1
DO CLNT_MNT
CASE n_Choice = 2
DO PROD_MNT
.
.
.
CASE n_Choice = 27
IF ASK("Are you sure","YyNn") $ "Yy"
EXIT
ENDIF
ENDCASE
ENDDO
QUIT
Usage:
See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson